/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.mortbay.jetty.pico.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Hnmtuan
 */
@Entity
@Table(name = "customfield")
@NamedQueries({
    @NamedQuery(name = "Customfield.findAll", query = "SELECT c FROM Customfield c"),
    @NamedQuery(name = "Customfield.findByIdCustom", query = "SELECT c FROM Customfield c WHERE c.idCustom = :idCustom"),
    @NamedQuery(name = "Customfield.findByCustomName", query = "SELECT c FROM Customfield c WHERE c.customName = :customName"),
    @NamedQuery(name = "Customfield.findByCustomState", query = "SELECT c FROM Customfield c WHERE c.customState = :customState")})
public class Customfield implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "IdCustom")
    private Integer idCustom;
    @Column(name = "CustomName")
    private String customName;
    @Column(name = "CustomState")
    private Integer customState;

    public Customfield() {
    }

    public Customfield(Integer idCustom) {
        this.idCustom = idCustom;
    }

    public Integer getIdCustom() {
        return idCustom;
    }

    public void setIdCustom(Integer idCustom) {
        this.idCustom = idCustom;
    }

    public String getCustomName() {
        return customName;
    }

    public void setCustomName(String customName) {
        this.customName = customName;
    }

    public Integer getCustomState() {
        return customState;
    }

    public void setCustomState(Integer customState) {
        this.customState = customState;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idCustom != null ? idCustom.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Customfield)) {
            return false;
        }
        Customfield other = (Customfield) object;
        if ((this.idCustom == null && other.idCustom != null) || (this.idCustom != null && !this.idCustom.equals(other.idCustom))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.mortbay.jetty.pico.entities.Customfield[idCustom=" + idCustom + "]";
    }

}
